<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

%> 
<!DOCTYPE html >
<html>
<head>
	<base href="<%=basePath%>">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>发布文章</title>
	<link href="view/plugins/bootstrap/css/bootstrap.css" rel="stylesheet">
    <link href="view/bac/css/font-awesome.min.css" rel="stylesheet">
    <link href="view/bac/css/animate.css" rel="stylesheet">
    <link href="view/bac/css/style.css" rel="stylesheet">
    <link href="view/plugins/summernote/dist/summernote.css" rel="stylesheet">
    
    
    <style type="text/css">
    .btn-default {
	    color: #333;
	    background-color: #fff;
	    border-color: #ccc;
	}
	.btn-page-style{width:30%;float:left;}
	.btn-page-style-select{width:15%;float:left;}
    </style>
</head>
<body class="gray-bg" >
    <!-- <div class="wrapper wrapper-content animated fadeInRight" style="padding:10" > -->
	    <div class="row" style="height:100%">
            <div class="col-sm-8">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>撰写博文</h5>
                        <div class="ibox-tools">
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                            <a class="dropdown-toggle" data-toggle="dropdown" href="typography.html#">
                                <i class="fa fa-wrench"></i>
                            </a>
                            <ul class="dropdown-menu dropdown-user">
                                
                            </ul>
                            <a class="close-link">
                                <i class="fa fa-times"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                       <form class="form-horizontal m-t" id="pushBlogForm">
                         <div class="form-group">
                             <label class="col-sm-2 control-label">标题：</label>
                             <div class="col-sm-4">
                                 <input id="blogTitle" name="blogTitle" minlength="2" type="text" class="form-control" required="" aria-required="true">
                             </div>
                         </div>
                         <div class="form-group">
                             <label class="col-sm-2 control-label">类别：</label>
                             <div class="col-sm-4">
                                 <select class="form-control m-b" id="typeNo" name="type_no">
                                       
                                 </select>
                             </div>
                         </div>
                         <div class="form-group">
                             <label class="col-sm-2 control-label"></label>
                             <div class="col-sm-8">
                                 <button type="button" class="btn btn-primary" id="open-file-manager-model">  添加媒体</button>
                             </div>
                         </div>
                         <div class="form-group">
                             <input id="curl" type="hidden" class="form-control" name="blogContent">
                         </div>
                         
                     </form>
                     <form class="form-horizontal m-t">
                     	<div class="form-group">
                             <label class="col-sm-2 control-label">内容：</label>
                             <input id="curl" type="hidden" class="form-control" name="blogContent">
                             <div class="col-sm-10">
                           		<div class="summernote" id="b_content"></div>
                             </div>
                         </div>
                     </form>
                  	</div>
                </div>
            </div>

            <div class="col-sm-4">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>设置封面</h5>
                        <div class="ibox-tools">
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                            <a class="close-link">
                                <i class="fa fa-times"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div>
                        </div>

						<form role="form" class="form-horizontal m-t">
							<div class="form-group draggable ui-draggable" >
	                                <label class="col-sm-3 control-label">预览：</label>
	                                <div class="col-sm-9">
		                                <div  style="height:auto;width:100%;max-height:200px;">
		                                	<img src="content/admin/timg.jpg"  id="blog_img" style="width:100%;" alt="" /> 
		                                </div>
	                                </div>
	                        </div>
							<div class="form-group draggable ui-draggable">
	                                <label class="col-sm-3 control-label">文件域：</label>
	                                <div class="col-sm-9">
	                                    <!-- <input type="file" name="" class="form-control"> -->
	                                    
	                                    <input class="form-control" id="fileToUpload"  type="file" name="upfile"><br/>  
	                                    
	                                </div>
	                        </div>
						</form>
                    </div>
                </div>
            </div>
            <div class="col-sm-4">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>发布状态</h5>
                        <div class="ibox-tools">
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                            <a class="close-link">
                                <i class="fa fa-times"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                    	<form role="form" class="form-horizontal m-t">
	                        <div class="form-group draggable ui-draggable">
	                            <label class="col-sm-4 control-label">发布状态：</label>
	                            <div class="col-sm-8">
	                            	<div id="radio-show-type">
	                            	
	                                <label class="radio-inline">
	                                    <input type="radio" checked="" value="0" id="showType" name="showType">公开</label>
	                                <label class="radio-inline">
	                                    <input type="radio" value="1" id="showType" name="showType">私密(仅自己)</label>
	                            	</div>
	                            </div>
	                         </div>
	                         <div id="model_hide">
		                         <div class="hr-line-dashed"></div>
		                         <div class="form-group draggable ui-draggable">
	                                <div class="col-sm-12 col-sm-offset-3">
	                                    <button id="preview_blog" class="btn btn-white" type="button">预览</button>
	                                    <button id="push_blog" class="btn btn-primary" type="button">发布</button>
	                                </div>
	                            </div>
	                         </div>
	            		</form>
                    </div>
                </div>
            </div>
        </div>
    
    
   
    
    
   	<!-- 全局js -->
	<script src="view/plugins/jquery/jquery-1.8.3.min.js"></script>
    <script src="view/plugins/bootstrap/js/bootstrap.min.js"></script>
    <script src="view/bac/js/async-ajax.js"></script>

    <!-- SUMMERNOTE -->
    <script src="view/plugins/summernote/dist/summernote.js"></script>
    <script src="view/plugins/summernote/summernote-zh-CN.js"></script>

   
    
    
<!--     /*
    var json2map=JSON.parse(json);

	var map2json=JSON.stringify(map);
    */ -->

    <script>
    
        $(document).ready(function () {
            $('#b_content ').summernote({
                lang: 'zh-CN',
                height:350,
                callbacks: {  
                    onImageUpload: function(files, editor, $editable) { //the onImageUpload API  
                        summernoteUpload(files);  
                   }
                }
	            
            });
        });
    </script>
    
</body>
</html>